/**
 * Created by lihaoyu on 2017/8/11.
 */
$(document).ready(function () {
    $("#signIn").click(function () {
        var pwMd5 = $.md5($("#PW").val());
        $.ajax({
            type: "POST",
            url: "/login_post",
            dataType:'json',
            data: "ID="+$("#ID").val()+"&PW="+pwMd5,
            success:function(msg){
                if(msg.result!="root"){
                    alert(msg.result);
                }
                else{
                    $.toast("getin root page",function () {
                        window.location.href="root.html";    //管理ページ
                    });
                }
            },
            error:function(msg){
                console.log("error");
            }
        });
    });
});